import { PortalBaseSchema, PortalBaseSchemaRenderType, PortalBaseSchemaType, PortalProperty, PortalPropertyType } from "../../interface/template/declare";
import { BasePortalDefination } from "./BasePortalDefination";


export class ShopListPortalSchema implements PortalBaseSchema {
  type: PortalBaseSchemaType;
  name: string;
  render?: PortalBaseSchemaRenderType | undefined;
  properties: PortalProperty[];

  constructor() {
    this.name = 'shopList'
    this.type = 'mutial'
    this.properties = [
      {
        title: '栏目名称',
        name: 'layoutName',
        type: PortalPropertyType.Text
      },
      {
        title: '开始时间/结束时间',
        name: 'dateRange',
        type: PortalPropertyType.DateRange
      },
      {
        title: '栏目商品',
        name: 'shopList',
        type: PortalPropertyType.ShopRefer
      }
    ]
  }
}

export class ShopListPortalDefination extends BasePortalDefination {

  schema: PortalBaseSchema;
  layoutName: string
  startDate: string
  endDate: string

  noticeList: Array<any>
  constructor() {
    super()
    this.title = '今日特惠'
    this.schema = new ShopListPortalSchema()
  }
}